<template>
  <div class="nav-bar">
    <div class="back">返回</div>
    <div class="title">校园闲置</div>
    <div class="release" @click="to_release">
      <img src="../../assets/img/Mall/release/tianjiazengjiajia.svg" alt="">
    </div>
  </div>
</template>

<script>

export default {
  name: '',
  data () {
    return {
      
    }
  },
  props:{
    uid:{
      type:String,
      default:null
    }
  },
  methods:{
  to_release(){
    if(!this.uid){
      return alert('登录后可发布商品')
    } else{
      this.$router.push('/release')
    }
    
  }
}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .nav-bar{
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    width: 100%;
    height: 44px;
    background-color: #ff8198;
    color: #fff;
    text-align: center;
    line-height: 44px;
    z-index: 1;
  }
  .back,.release{
    width: 60px;
  }
  .release img{
    width: 45px;
  }
  .title{
    flex: 1;
  }
</style>